# Contributor: Michael Lyngbol <michael@lyngbol.dk>
# Maintainer: Michael Lyngbol <michael@lyngbol.dk>
pkgname=inetutils-telnet
_pkgname=inetutils
pkgver=2.5
pkgrel=0
pkgdesc="Telnet client from GNU network utilities"
url="https://www.gnu.org/software/inetutils"
arch="all"
license="GPL-3.0-or-later"
depends="ncurses"
makedepends="ncurses-dev"
subpackages="$pkgname-doc"
source="https://ftp.gnu.org/gnu/inetutils/$_pkgname-$pkgver.tar.xz
	"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexec=/usr/sbin \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-clients \
		--disable-servers \
		--enable-telnet
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	# remove empty directories
	rm -rf "$pkgdir"/usr/sbin \
		"$pkgdir"/usr/share/man/man8
}

sha512sums="
dc11ad6eeb5ea2c85edddbfc77630b5b09e4e1ac643629edf13b0ac0828c13cdb0885275153c072ae13a798427c96bc461037822ad646f7210369192c35bb04c  inetutils-2.5.tar.xz
"
